home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Games / MAME / src / drivers / wc90b.c < prev    next >
C/C++ Source or Header  |  2000-05-04  |  17KB  |  481 lines

  1. /*
  2. World Cup 90 bootleg driver
  3. ---------------------------
  4.  
  5. Ernesto Corvi
  6. (ernesto@imagina.com)
  7.  
  8. CPU #1 : Handles background & foreground tiles, controllers, dipswitches.
  9. CPU #2 : Handles sprites and palette
  10. CPU #3 : Audio. The audio chip is a YM2203. I need help with this!.
  11.  
  12. Memory Layout:
  13.  
  14. CPU #1
  15. 0000-8000 ROM
  16. 8000-9000 RAM
  17. a000-a800 Color Ram for background #1 tiles
  18. a800-b000 Video Ram for background #1 tiles
  19. c000-c800 Color Ram for background #2 tiles
  20. c800-c000 Video Ram for background #2 tiles
  21. e000-e800 Color Ram for foreground tiles
  22. e800-f000 Video Ram for foreground tiles
  23. f800-fc00 Common Ram with CPU #2
  24. fd00-fd00 Stick 1, Coin 1 & Start 1 input port
  25. fd02-fd02 Stick 2, Coin 2 & Start 2 input port
  26. fd06-fc06 Dip Switch A
  27. fd08-fc08 Dip Switch B
  28.  
  29. CPU #2
  30. 0000-c000 ROM
  31. c000-d000 RAM
  32. d000-d800 RAM Sprite Ram
  33. e000-e800 RAM Palette Ram
  34. f800-fc00 Common Ram with CPU #1
  35.  
  36. CPU #3
  37. 0000-0xc000 ROM
  38. ???????????
  39.  
  40. Notes:
  41. -----
  42. The bootleg video hardware is quite different from the original machine.
  43. I could not figure out the encoding of the scrolling for the new
  44. video hardware. The memory positions, in case anyone wants to try, are
  45. the following ( CPU #1 memory addresses ):
  46. fd06: scroll bg #1 X coordinate
  47. fd04: scroll bg #1 Y coordinate
  48. fd08: scroll bg #2 X coordinate
  49. fd0a: scroll bg #2 Y coordinate
  50. fd0e: ????
  51.  
  52. What i used instead, was the local copy kept in RAM. These values
  53. are the ones the original machine uses. This will differ when trying
  54. to use some of this code to write a driver for a similar tecmo bootleg.
  55.  
  56. Sprites are also very different. Theres a code snippet in the ROM
  57. that converts the original sprites to the new format, wich only allows
  58. 16x16 sprites. That snippet also does some ( nasty ) clipping.
  59.  
  60. Colors are accurate. The graphics ROMs have been modified severely
  61. and encoded in a different way from the original machine. Even if
  62. sometimes it seems colors are not entirely correct, this is only due
  63. to the crappy artwork of the person that did the bootleg.
  64.  
  65. Dip switches are not complete and they dont seem to differ from
  66. the original machine.
  67.  
  68. Last but not least, the set of ROMs i have for Euro League seem to have
  69. the sprites corrupted. The game seems to be exactly the same as the
  70. World Cup 90 bootleg.
  71. */
  72.  
  73. #include "driver.h"
  74. #include "vidhrdw/generic.h"
  75. #include "cpu/z80/z80.h"
  76.  
  77.  
  78. #define TEST_DIPS false /* enable to test unmapped dip switches */
  79.  
  80. extern unsigned char *wc90b_shared;
  81.  
  82. extern unsigned char *wc90b_tile_colorram, *wc90b_tile_videoram;
  83. extern unsigned char *wc90b_tile_colorram2, *wc90b_tile_videoram2;
  84. extern unsigned char *wc90b_scroll1xlo, *wc90b_scroll1xhi;
  85. extern unsigned char *wc90b_scroll2xlo, *wc90b_scroll2xhi;
  86. extern unsigned char *wc90b_scroll1ylo, *wc90b_scroll1yhi;
  87. extern unsigned char *wc90b_scroll2ylo, *wc90b_scroll2yhi;
  88.  
  89. extern size_t wc90b_tile_videoram_size;
  90. extern size_t wc90b_tile_videoram_size2;
  91.  
  92. int wc90b_vh_start( void );
  93. void wc90b_vh_stop ( void );
  94. READ_HANDLER( wc90b_tile_videoram_r );
  95. WRITE_HANDLER( wc90b_tile_videoram_w );
  96. READ_HANDLER( wc90b_tile_colorram_r );
  97. WRITE_HANDLER( wc90b_tile_colorram_w );
  98. READ_HANDLER( wc90b_tile_videoram2_r );
  99. WRITE_HANDLER( wc90b_tile_videoram2_w );
  100. READ_HANDLER( wc90b_tile_colorram2_r );
  101. WRITE_HANDLER( wc90b_tile_colorram2_w );
  102. READ_HANDLER( wc90b_shared_r );
  103. WRITE_HANDLER( wc90b_shared_w );
  104. void wc90b_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh);
  105.  
  106.  
  107. static WRITE_HANDLER( wc90b_bankswitch_w )
  108. {
  109.     int bankaddress;
  110.     unsigned char *RAM = memory_region(REGION_CPU1);
  111.  
  112.  
  113.     bankaddress = 0x10000 + ((data & 0xf8) << 8);
  114.     cpu_setbank(1,&RAM[bankaddress]);
  115. }
  116.  
  117. static WRITE_HANDLER( wc90b_bankswitch1_w )
  118. {
  119.     int bankaddress;
  120.     unsigned char *RAM = memory_region(REGION_CPU2);
  121.  
  122.  
  123.     bankaddress = 0x10000 + ((data & 0xf8) << 8);
  124.     cpu_setbank(2,&RAM[bankaddress]);
  125. }
  126.  
  127. static WRITE_HANDLER( wc90b_sound_command_w )
  128. {
  129.     soundlatch_w(offset,data);
  130.     cpu_cause_interrupt(2,/*Z80_NMI_INT*/-1000);
  131. }
  132.  
  133. static struct MemoryReadAddress wc90b_readmem1[] =
  134. {
  135.     { 0x0000, 0x7fff, MRA_ROM },
  136.     { 0x8000, 0x9fff, MRA_RAM }, /* Main RAM */
  137.     { 0xa000, 0xa7ff, wc90b_tile_colorram_r }, /* bg 1 color ram */
  138.     { 0xa800, 0xafff, wc90b_tile_videoram_r }, /* bg 1 tile ram */
  139.     { 0xc000, 0xc7ff, wc90b_tile_colorram2_r }, /* bg 2 color ram */
  140.     { 0xc800, 0xcfff, wc90b_tile_videoram2_r }, /* bg 2 tile ram */
  141.     { 0xe000, 0xe7ff, colorram_r }, /* fg color ram */
  142.     { 0xe800, 0xefff, videoram_r }, /* fg tile ram */
  143.     { 0xf000, 0xf7ff, MRA_BANK1 },
  144.     { 0xf800, 0xfbff, wc90b_shared_r },
  145.     { 0xfd00, 0xfd00, input_port_0_r }, /* Stick 1, Coin 1 & Start 1 */
  146.     { 0xfd02, 0xfd02, input_port_1_r }, /* Stick 2, Coin 2 & Start 2 */
  147.     { 0xfd06, 0xfd06, input_port_2_r }, /* DIP Switch A */
  148.     { 0xfd08, 0xfd08, input_port_3_r }, /* DIP Switch B */
  149.     { 0xfd00, 0xffff, MRA_RAM },
  150.     { -1 }    /* end of table */
  151. };
  152.  
  153. static struct MemoryReadAddress wc90b_readmem2[] =
  154. {
  155.     { 0x0000, 0xbfff, MRA_ROM },
  156.     { 0xc000, 0xc1ff, MRA_RAM },
  157.     { 0xc200, 0xe1ff, MRA_RAM },
  158.     { 0xe000, 0xe7ff, MRA_RAM },
  159.     { 0xf000, 0xf7ff, MRA_BANK2 },
  160.     { 0xf800, 0xfbff, wc90b_shared_r },
  161.     { -1 }    /* end of table */
  162. };
  163.  
  164. static struct MemoryWriteAddress wc90b_writemem1[] =
  165. {
  166.     { 0x0000, 0x7fff, MWA_ROM },
  167.     { 0x8000, 0x8075, MWA_RAM },
  168.     { 0x8076, 0x8076, MWA_RAM, &wc90b_scroll1xlo },
  169.     { 0x8077, 0x8077, MWA_RAM, &wc90b_scroll1xhi },
  170.     { 0x8078, 0x8078, MWA_RAM, &wc90b_scroll1ylo },
  171.     { 0x8079, 0x8079, MWA_RAM, &wc90b_scroll1yhi },
  172.     { 0x807a, 0x807a, MWA_RAM, &wc90b_scroll2xlo },
  173.     { 0x807b, 0x807b, MWA_RAM, &wc90b_scroll2xhi },
  174.     { 0x807c, 0x807c, MWA_RAM, &wc90b_scroll2ylo },
  175.     { 0x807d, 0x807d, MWA_RAM, &wc90b_scroll2yhi },
  176.     { 0x807e, 0x9fff, MWA_RAM },
  177.     { 0xa000, 0xa7ff, wc90b_tile_colorram_w, &wc90b_tile_colorram },
  178.     { 0xa800, 0xafff, wc90b_tile_videoram_w, &wc90b_tile_videoram, &wc90b_tile_videoram_size },
  179.     { 0xc000, 0xc7ff, wc90b_tile_colorram2_w, &wc90b_tile_colorram2 },
  180.     { 0xc800, 0xcfff, wc90b_tile_videoram2_w, &wc90b_tile_videoram2, &wc90b_tile_videoram_size2 },
  181.     { 0xe000, 0xe7ff, colorram_w, &colorram },
  182.     { 0xe800, 0xefff, videoram_w, &videoram, &videoram_size },
  183.     { 0xf000, 0xf7ff, MWA_ROM },
  184.     { 0xf800, 0xfbff, wc90b_shared_w, &wc90b_shared },
  185.     { 0xfc00, 0xfc00, wc90b_bankswitch_w },
  186.     { 0xfd00, 0xfd00, wc90b_sound_command_w },
  187.     /*  */
  188.     { -1 }    /* end of table */
  189. };
  190.  
  191. static struct MemoryWriteAddress wc90b_writemem2[] =
  192. {
  193.     { 0x0000, 0xbfff, MWA_ROM },
  194.     { 0xc000, 0xcfff, MWA_RAM },
  195.     { 0xd000, 0xd7ff, MWA_RAM, &spriteram, &spriteram_size },
  196.     { 0xe000, 0xe7ff, paletteram_xxxxBBBBGGGGRRRR_swap_w, &paletteram },
  197.     { 0xf000, 0xf7ff, MWA_ROM },
  198.     { 0xf800, 0xfbff, wc90b_shared_w },
  199.     { 0xfc00, 0xfc00, wc90b_bankswitch1_w },
  200.     { -1 }    /* end of table */
  201. };
  202.  
  203. static struct MemoryReadAddress sound_readmem[] =
  204. {
  205.     { 0x0000, 0xbfff, MRA_ROM },
  206.     { 0xf000, 0xf7ff, MRA_RAM },
  207.     { 0xe800, 0xe800, YM2203_status_port_0_r },
  208.     { 0xe801, 0xe801, YM2203_read_port_0_r },
  209.     { 0xec00, 0xec00, YM2203_status_port_1_r },
  210.     { 0xec01, 0xec01, YM2203_read_port_1_r },
  211.     { 0xf800, 0xf800, soundlatch_r },
  212.     { -1 }    /* end of table */
  213. };
  214.  
  215. static struct MemoryWriteAddress sound_writemem[] =
  216. {
  217.     { 0x0000, 0xbfff, MWA_ROM },
  218.     { 0xf000, 0xf7ff, MWA_RAM },
  219.     { 0xe800, 0xe800, YM2203_control_port_0_w },
  220.     { 0xe801, 0xe801, YM2203_write_port_0_w },
  221.     { 0xec00, 0xec00, YM2203_control_port_1_w },
  222.     { 0xec01, 0xec01, YM2203_write_port_1_w },
  223.     { -1 }    /* end of table */
  224. };
  225.  
  226. INPUT_PORTS_START( wc90b )
  227.     PORT_START    /* IN0 bit 0-5 */
  228.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY )
  229.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_8WAY )
  230.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_8WAY )
  231.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_8WAY )
  232.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
  233.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 )
  234.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START1 )
  235.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 )
  236.  
  237.     PORT_START    /* IN1 bit 0-5 */
  238.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER2 )
  239.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_8WAY | IPF_PLAYER2 )
  240.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_8WAY | IPF_PLAYER2 )
  241.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_8WAY | IPF_PLAYER2 )
  242.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2 )
  243.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER2 )
  244.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START2 )
  245.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN2 )
  246.  
  247.     PORT_START    /* DSWA */
  248.     PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coinage ) )
  249.     PORT_DIPSETTING(    0x00, "10 Coins/1 Credit" )
  250.     PORT_DIPSETTING(    0x08, DEF_STR( 9C_1C ) )
  251.     PORT_DIPSETTING(    0x04, DEF_STR( 8C_1C ) )
  252.     PORT_DIPSETTING(    0x0c, DEF_STR( 7C_1C ) )
  253.     PORT_DIPSETTING(    0x02, DEF_STR( 6C_1C ) )
  254.     PORT_DIPSETTING(    0x0a, DEF_STR( 5C_1C ) )
  255.     PORT_DIPSETTING(    0x06, DEF_STR( 4C_1C ) )
  256.     PORT_DIPSETTING(    0x0e, DEF_STR( 3C_1C ) )
  257.     PORT_DIPSETTING(    0x09, DEF_STR( 2C_1C ) )
  258.     PORT_DIPSETTING(    0x0f, DEF_STR( 1C_1C ) )
  259.     PORT_DIPSETTING(    0x01, DEF_STR( 2C_3C ) )
  260.     PORT_DIPSETTING(    0x07, DEF_STR( 1C_2C ) )
  261.     PORT_DIPSETTING(    0x0b, DEF_STR( 1C_3C ) )
  262.     PORT_DIPSETTING(    0x03, DEF_STR( 1C_4C ) )
  263.     PORT_DIPSETTING(    0x0d, DEF_STR( 1C_5C ) )
  264.     PORT_DIPSETTING(    0x05, DEF_STR( 1C_6C ) )
  265.     PORT_DIPNAME( 0x30, 0x30, DEF_STR( Difficulty ) )
  266.     PORT_DIPSETTING(    0x30, "Easy" )
  267.     PORT_DIPSETTING(    0x10, "Normal" )
  268.     PORT_DIPSETTING(    0x20, "Hard" )
  269.     PORT_DIPSETTING(    0x00, "Hardest" )
  270.     PORT_DIPNAME( 0x40, 0x40, "Continue Game countdown speed" )
  271.     PORT_DIPSETTING(    0x40, "Normal (1 sec per number)" )
  272.     PORT_DIPSETTING(    0x00, "Faster (56/60 per number)" )
  273.     PORT_DIPNAME( 0x80, 0x80, DEF_STR( Demo_Sounds ) )
  274.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  275.     PORT_DIPSETTING(    0x80, DEF_STR( On ) )
  276.  
  277.     PORT_START    /* DSWB */
  278.     PORT_DIPNAME( 0x03, 0x03, "1 Player Game Time" )
  279.     PORT_DIPSETTING(    0x01, "1:00" )
  280.     PORT_DIPSETTING(    0x02, "1:30" )
  281.     PORT_DIPSETTING(    0x03, "2:00" )
  282.     PORT_DIPSETTING(    0x00, "2:30" )
  283.     PORT_DIPNAME( 0x1c, 0x1c, "2 Player Game Time" )
  284.     PORT_DIPSETTING(    0x0c, "1:00" )
  285.     PORT_DIPSETTING(    0x14, "1:30" )
  286.     PORT_DIPSETTING(    0x04, "2:00" )
  287.     PORT_DIPSETTING(    0x18, "2:30" )
  288.     PORT_DIPSETTING(    0x1c, "3:00" )
  289.     PORT_DIPSETTING(    0x08, "3:30" )
  290.     PORT_DIPSETTING(    0x10, "4:00" )
  291.     PORT_DIPSETTING(    0x00, "5:00" )
  292.     PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
  293.     PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
  294.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  295.     PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
  296.     PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
  297.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  298.     PORT_DIPNAME( 0x80, 0x00, "Language" )
  299.     PORT_DIPSETTING(    0x00, "English" )
  300.     PORT_DIPSETTING(    0x80, "Japanese" )
  301. INPUT_PORTS_END
  302.  
  303. static struct GfxLayout charlayout =
  304. {
  305.     8,8,    /* 8*8 characters */
  306.     2048,    /* 2048 characters */
  307.     4,    /* 4 bits per pixel */
  308.     { 0, 0x4000*8, 0x8000*8, 0xc000*8 },    /* the bitplanes are separated */
  309.     { 0, 1, 2, 3, 4, 5, 6, 7 },
  310.     { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 },
  311.     8*8    /* every char takes 8 consecutive bytes */
  312. };
  313.  
  314. static struct GfxLayout tilelayout =
  315. {
  316.     16,16,    /* 16*16 characters */
  317.     256,    /* 256 characters */
  318.     4,    /* 4 bits per pixel */
  319.     { 0*0x20000*8, 1*0x20000*8, 2*0x20000*8, 3*0x20000*8 },    /* the bitplanes are separated */
  320.     { 0, 1, 2, 3, 4, 5, 6, 7,
  321.         (0x1000*8)+0, (0x1000*8)+1, (0x1000*8)+2, (0x1000*8)+3, (0x1000*8)+4, (0x1000*8)+5, (0x1000*8)+6, (0x1000*8)+7 },
  322.     { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8,
  323.         0x800*8, 0x800*8+1*8, 0x800*8+2*8, 0x800*8+3*8, 0x800*8+4*8, 0x800*8+5*8, 0x800*8+6*8, 0x800*8+7*8 },
  324.     8*8    /* every char takes 8 consecutive bytes */
  325. };
  326.  
  327. static struct GfxLayout spritelayout =
  328. {
  329.     16,16,    /* 32*32 characters */
  330.     4096,    /* 1024 characters */
  331.     4,    /* 4 bits per pixel */
  332.     { 3*0x20000*8, 2*0x20000*8, 1*0x20000*8, 0*0x20000*8 },    /* the bitplanes are separated */
  333.     { 0, 1, 2, 3, 4, 5, 6, 7,
  334.         (16*8)+0, (16*8)+1, (16*8)+2, (16*8)+3, (16*8)+4, (16*8)+5, (16*8)+6, (16*8)+7 },
  335.     { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8,
  336.         8*8, 8*8+1*8, 8*8+2*8, 8*8+3*8, 8*8+4*8, 8*8+5*8, 8*8+6*8, 8*8+7*8 },
  337.     32*8    /* every char takes 128 consecutive bytes */
  338. };
  339.  
  340. static struct GfxDecodeInfo gfxdecodeinfo[] =
  341. {
  342.     { REGION_GFX1, 0x00000, &charlayout,          1*16*16, 16*16 },
  343.     { REGION_GFX2, 0x00000, &tilelayout,            2*16*16, 16*16 },
  344.     { REGION_GFX2, 0x02000, &tilelayout,            2*16*16, 16*16 },
  345.     { REGION_GFX2, 0x04000, &tilelayout,            2*16*16, 16*16 },
  346.     { REGION_GFX2, 0x06000, &tilelayout,            2*16*16, 16*16 },
  347.     { REGION_GFX2, 0x08000, &tilelayout,            2*16*16, 16*16 },
  348.     { REGION_GFX2, 0x0a000, &tilelayout,            2*16*16, 16*16 },
  349.     { REGION_GFX2, 0x0c000, &tilelayout,            2*16*16, 16*16 },
  350.     { REGION_GFX2, 0x0e000, &tilelayout,            2*16*16, 16*16 },
  351.     { REGION_GFX2, 0x10000, &tilelayout,            3*16*16, 16*16 },
  352.     { REGION_GFX2, 0x12000, &tilelayout,            3*16*16, 16*16 },
  353.     { REGION_GFX2, 0x14000, &tilelayout,            3*16*16, 16*16 },
  354.     { REGION_GFX2, 0x16000, &tilelayout,            3*16*16, 16*16 },
  355.     { REGION_GFX2, 0x18000, &tilelayout,            3*16*16, 16*16 },
  356.     { REGION_GFX2, 0x1a000, &tilelayout,            3*16*16, 16*16 },
  357.     { REGION_GFX2, 0x1c000, &tilelayout,            3*16*16, 16*16 },
  358.     { REGION_GFX2, 0x1e000, &tilelayout,            3*16*16, 16*16 },
  359.     { REGION_GFX3, 0x00000, &spritelayout,        0*16*16, 16*16 }, // sprites
  360.     { -1 } /* end of array */
  361. };
  362.  
  363.  
  364.  
  365. /* handler called by the 2203 emulator when the internal timers cause an IRQ */
  366. static void irqhandler(int irq)
  367. {
  368.     cpu_set_nmi_line(2,irq ? ASSERT_LINE : CLEAR_LINE);
  369. }
  370.  
  371. static struct YM2203interface ym2203_interface =
  372. {
  373.     2,            /* 2 chips */
  374.     2000000,    /* 2 MHz ????? */
  375.     { YM2203_VOL(25,25), YM2203_VOL(25,25) },
  376.     { 0 },
  377.     { 0 },
  378.     { 0 },
  379.     { 0 },
  380.     { irqhandler }
  381. };
  382.  
  383. static struct MachineDriver machine_driver_wc90b =
  384. {
  385.     /* basic machine hardware */
  386.     {
  387.         {
  388.             CPU_Z80,
  389.             6000000,    /* 6.0 Mhz ??? */
  390.             wc90b_readmem1, wc90b_writemem1,0,0,
  391.             interrupt,1
  392.         },
  393.         {
  394.             CPU_Z80,
  395.             6000000,    /* 6.0 Mhz ??? */
  396.             wc90b_readmem2, wc90b_writemem2,0,0,
  397.             interrupt,1
  398.         },
  399.         {
  400.             CPU_Z80 | CPU_AUDIO_CPU,
  401.             4000000,    /* 4 MHz ???? */
  402.             sound_readmem,sound_writemem,0,0,
  403.             ignore_interrupt,0    /* NMIs are triggered by the YM2203 */
  404.                                 /* IRQs are triggered by the main CPU */
  405.         }
  406.  
  407.     },
  408.     60, DEFAULT_60HZ_VBLANK_DURATION,    /* frames per second, vblank duration */
  409.     1,    /* 1 CPU slice per frame - interleaving is forced when a sound command is written */
  410.     0,
  411.  
  412.     /* video hardware */
  413.     32*8, 32*8, { 0*8, 32*8-1, 2*8, 30*8-1 },
  414.     gfxdecodeinfo,
  415.     4*16*16, 4*16*16,
  416.     0,
  417.  
  418.     VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE,
  419.     0,
  420.     wc90b_vh_start,
  421.     wc90b_vh_stop,
  422.     wc90b_vh_screenrefresh,
  423.  
  424.     /* sound hardware */
  425.     0,0,0,0,
  426.     {
  427.         {
  428.             SOUND_YM2203,
  429.             &ym2203_interface
  430.         }
  431.     }
  432. };
  433.  
  434. ROM_START( wc90b )
  435.     ROM_REGION( 0x20000, REGION_CPU1 )    /* 128k for code */
  436.     ROM_LOAD( "a02.bin",      0x00000, 0x10000, 0x192a03dd )    /* c000-ffff is not used */
  437.     ROM_LOAD( "a03.bin",      0x10000, 0x10000, 0xf54ff17a )    /* banked at f000-f7ff */
  438.  
  439.     ROM_REGION( 0x20000, REGION_CPU2 )    /* 96k for code */  /* Second CPU */
  440.     ROM_LOAD( "a04.bin",      0x00000, 0x10000, 0x3d535e2f )    /* c000-ffff is not used */
  441.     ROM_LOAD( "a05.bin",      0x10000, 0x10000, 0x9e421c4b )    /* banked at f000-f7ff */
  442.  
  443.     ROM_REGION( 0x10000, REGION_CPU3 )    /* 192k for the audio CPU */
  444.     ROM_LOAD( "a01.bin",      0x00000, 0x10000, 0x3d317622 )
  445.  
  446.     ROM_REGION( 0x010000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  447.     ROM_LOAD( "a06.bin",      0x000000, 0x04000, 0x3b5387b7 )
  448.     ROM_LOAD( "a08.bin",      0x004000, 0x04000, 0xc622a5a3 )
  449.     ROM_LOAD( "a10.bin",      0x008000, 0x04000, 0x0923d9f6 )
  450.     ROM_LOAD( "a20.bin",      0x00c000, 0x04000, 0xb8dec83e )
  451.  
  452.     ROM_REGION( 0x080000, REGION_GFX2 | REGIONFLAG_DISPOSE )
  453.     ROM_LOAD( "a07.bin",      0x000000, 0x20000, 0x38c31817 )
  454.     ROM_LOAD( "a09.bin",      0x020000, 0x20000, 0x32e39e29 )
  455.     ROM_LOAD( "a11.bin",      0x040000, 0x20000, 0x5ccec796 )
  456.     ROM_LOAD( "a21.bin",      0x060000, 0x20000, 0x0c54a091 )
  457.  
  458.     ROM_REGION( 0x080000, REGION_GFX3 | REGIONFLAG_DISPOSE )
  459.     ROM_LOAD( "146_a12.bin",  0x000000, 0x10000, 0xd5a60096 )
  460.     ROM_LOAD( "147_a13.bin",  0x010000, 0x10000, 0x36bbf467 )
  461.     ROM_LOAD( "148_a14.bin",  0x020000, 0x10000, 0x26371c18 )
  462.     ROM_LOAD( "149_a15.bin",  0x030000, 0x10000, 0x75aa9b86 )
  463.     ROM_LOAD( "150_a16.bin",  0x040000, 0x10000, 0x0da825f9 )
  464.     ROM_LOAD( "151_a17.bin",  0x050000, 0x10000, 0x228429d8 )
  465.     ROM_LOAD( "152_a18.bin",  0x060000, 0x10000, 0x516b6c09 )
  466.     ROM_LOAD( "153_a19.bin",  0x070000, 0x10000, 0xf36390a9 )
  467. ROM_END
  468.  
  469.  
  470. void init_wc90b(void)
  471. {
  472.     int i;
  473.  
  474.     /* sprite graphics are inverted */
  475.     for (i = 0; i < memory_region_length(REGION_GFX3); i++)
  476.         memory_region(REGION_GFX3)[i] ^= 0xff;
  477. }
  478.  
  479.  
  480. GAMEX( 1989, wc90b, wc90, wc90b, wc90b, wc90b, ROT0, "bootleg", "Euro League", GAME_NO_COCKTAIL )
  481.